const NewsService = require("../../services/web/NewsService")

const NewsController = {
  getList:async (req,res) => {
    // 获取列表的接口要将数据返回出去
    const result = await NewsService.getList(req.params.id)
    res.send({
      ActionType:'OK',
      data:result
    })
  },
  toplist:async (req,res) => {
    // 获取列表的接口要将数据返回出去
    const result = await NewsService.toplist(req.query.limit)
    res.send({
      ActionType:'OK',
      data:result
    })
  },
}

module.exports = NewsController